<?php

/**
 * Description of formContent
 *
 * @author Kam
 */
class My_View_Helper_FormMinMax extends Zend_View_Helper_FormElement {

    public function formMinMax($name, $value = null, $attribs = null) {
        $info = $this->_getInfo($name, $value, $attribs);
        extract($info); // name, value, attribs, options, listsep, disable
        $wid = $this->view->escape($id) . '_' . uniqid();
        $class = isset($attribs['class']) ? $attribs['class'] : '';
        $class .= ' ' . $wid;
        $attribs['class'] = $class;
        $min = isset($value['min']) ? $value['min'] : '';
        $max = isset($value['max']) ? $value['max'] : '';
        $xhtml = '';
        $xhtml = '<div class="row-fluid">';
        $xhtml .= '<div class="span5">';
        $xhtml .= $this->view->formText($name, $min, $attribs);
        $xhtml .= '</div>';
        $xhtml .= '<div class="span2" style="text-align: center;">';
        $xhtml .= ' - ';
        $xhtml .= '</div>';
        $xhtml .= '<div class="span5">';
        $xhtml .= $this->view->formText($name, $max, $attribs);
        $xhtml .= '</div>';
        $xhtml .= '</div>';
        return $xhtml;
    }

}
